package cn.springboot.pioneermall.robotChat.service.Impl;


import cn.springboot.pioneermall.dao.HsChatMessageMapper;
import cn.springboot.pioneermall.robotChat.domain.HsChatMessage;
import cn.springboot.pioneermall.robotChat.service.IHsChatMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客服问答聊天记录Service业务层处理
 *
 * @author ljxl
 * @date 2023-10-22
 */
@Service
public class HsChatMessageServiceImpl implements IHsChatMessageService
{
    @Autowired
    private HsChatMessageMapper hsChatMessageMapper;

    /**
     * 查询客服问答聊天记录
     *
     * @param id 客服问答聊天记录ID
     * @return 客服问答聊天记录
     */
    @Override
    public HsChatMessage selectHsChatMessageById(String id)
    {
        return hsChatMessageMapper.selectHsChatMessageById(id);
    }

    /**
     * 查询客服问答聊天记录列表
     *
     * @param hsChatMessage 客服问答聊天记录
     * @return 客服问答聊天记录
     */
    @Override
    public List<HsChatMessage> selectHsChatMessageList(HsChatMessage hsChatMessage)
    {
        return hsChatMessageMapper.selectHsChatMessageList(hsChatMessage);
    }

    /**
     * 新增客服问答聊天记录
     *
     * @param hsChatMessage 客服问答聊天记录
     * @return 结果
     */
    @Override
    public int insertHsChatMessage(HsChatMessage hsChatMessage)
    {
        return hsChatMessageMapper.insertHsChatMessage(hsChatMessage);
    }

    /**
     * 修改客服问答聊天记录
     *
     * @param hsChatMessage 客服问答聊天记录
     * @return 结果
     */
    @Override
    public int updateHsChatMessage(HsChatMessage hsChatMessage)
    {
        return hsChatMessageMapper.updateHsChatMessage(hsChatMessage);
    }

    /**
     * 批量删除客服问答聊天记录
     *
     * @param ids 需要删除的客服问答聊天记录ID
     * @return 结果
     */
    @Override
    public int deleteHsChatMessageByIds(String[] ids)
    {
        return hsChatMessageMapper.deleteHsChatMessageByIds(ids);
    }

    /**
     * 删除客服问答聊天记录信息
     *
     * @param id 客服问答聊天记录ID
     * @return 结果
     */
    @Override
    public int deleteHsChatMessageById(String id)
    {
        return hsChatMessageMapper.deleteHsChatMessageById(id);
    }
}
